A constraint engine is a software module that is programmed using a set of constraints. Each constraint is a rule to be enforced by the constraint engine. Rules are specified as true/false conditions. The constraint engine is configured to generate a solution that satisfies all of the rules, such that each of the specified true/false conditions evaluates to true. Thus, a constraint engine can be configured to apply a set of rules, each of which specifies a condition that can depend upon one or more variables and that can evaluate to either true or false. The constraint engine is configured to generate a solution (e.g., a set of variable values) that causes all of the rules to evaluate to true.
In addition to being configured with prespecified rules, the constraint engine can receive requests as dynamic inputs. These requests can include values of one or more of the variables upon which the true/false conditions depend. Based on the rules and requests, the constraint engine identifies a solution that satisfies all of the rules.
Typically, off-the-shelf constraint engines are stateless. Accordingly, the solution generated by evaluating those rules will not depend upon any previously-generated solution. Furthermore, constraint engines typically operate in a non-cascading manner, such that a constraint engine will evaluate all of its rules at once. These aspects of off-the-shelf constraint engines may limit their usefulness in certain applications. For example, it is desirable to be able to use a constraint engine to generate the appropriate options to display to user when the user is configuring a product. Often, it is desirable to display these options in stages. For example, the user can select a configuration of one component in one stage and another component in another stage. If the constraint engine generates a solution in a later stage of configuration that changes a variable value that was already selected in a prior stage of configuration, it can result in a frustrating user experience, since a seemingly valid prior choice is now being invalidated.
While off-the-shelf constraint engines may have difficulties providing satisfactory solutions in certain environments, creating a custom constraint engine is extraordinarily expensive, in terms of both time and resources. Accordingly, it is desirable to be able to adapt an off-the-shelf constraint engine for use in such environments.
While the invention is susceptible to various modifications and alternative forms, specific embodiments of the invention are provided as examples in the drawings and detailed description. It should be understood that the drawings and detailed description are not intended to limit the invention to the particular form disclosed. Instead, the intention is to cover all modifications, equivalents and alternatives falling within the spirit and scope of the invention as defined by the appended claims.